Method and device for processing of images using a digital filter

ABSTRACT

A system, device and a method to perform bilateral filtering using linear convolution by way of an FFT or a recursive sequence method. Proper selection of functions for the photometric and spatial components of a bilateral filter may reduce the computational cost of the bilateral filter while preserving the bilateral filter de-noising and edge detection capabilities. Such functions may reduce the computational cost of a bilateral filter to substantially O(1).

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority from U.S. Provisional Application No. 61/067,348, filed on Feb. 28, 2008 and entitled “Method and Device for Improvement of Color Images Using Digital Filter”, the entire disclosure of which is incorporated herein by reference.

FIELD OF THE INVENTION

The present invention relates to the field of image processing. More specifically, the invention relates to bilateral filtering which may be used for improving image contrast and dynamic range, for de-noising and for image segmentation.

BACKGROUND OF THE INVENTION

A bilateral filter is a nonlinear filter that may smooth an image while preserving strong edges. The bilateral filter considers both spatial and photometric differences between a pixel under consideration Y({right arrow over (r)}) where {right arrow over (r)}=(x₁, . . . ,x_(m)) (m≧1) and its neighbors Y({right arrow over (r)}′) to produce a surrounding function w({right arrow over (r)},{right arrow over (r)}′). The surrounding function is than convoluted with image Y ({right arrow over (r)}) to yield the output image:

$\begin{matrix} {{{X\left( \overset{->}{r} \right)} = {\frac{1}{v\left( \overset{->}{r} \right)}{\sum\limits_{{\overset{->}{r}}^{\prime}}^{\;}{{w\left( {\overset{->}{r},{\overset{->}{r}}^{\prime}} \right)} \cdot {Y\left( {\overset{->}{r}}^{\prime} \right)}}}}}{{v\left( \overset{->}{r} \right)} = {\sum\limits_{{\overset{->}{r}}^{\prime}}^{\;}{w\left( {\overset{->}{r},{\overset{->}{r}}^{\prime}} \right)}}}} & \left( {{Equation}\mspace{14mu} 1} \right) \end{matrix}$

The function w({right arrow over (r)},{right arrow over (r)}′) is dependent on both a photometric value of the pixel Y({right arrow over (r)}) and pixel position {right arrow over (r)}, so that

w({right arrow over (r)},{right arrow over (r)}′)=w _(s)({right arrow over (r)}−{right arrow over (r)}′)·w _(ph)(Y({right arrow over (r)})−Y({right arrow over (r)}′))   (Equation 2)

where w_(s) is a spatial component and w_(ph) is a photometric component.

Typically, Gaussian functions are used for both the spatial and the photometric component:

$\begin{matrix} {{w_{s}\left( \overset{->}{r} \right)} = {\exp\left( {- \frac{{{\overset{->}{r} - {\overset{->}{r}}^{\prime}}}^{2}}{\sigma_{s}^{2}}} \right)}} & \left( {{Equation}\mspace{14mu} 3} \right) \end{matrix}$

and for the photometric component:

$\begin{matrix} {{w_{ph}\left( {\overset{->}{r},{\overset{->}{r}}^{\prime}} \right)} = {\exp\left( {- \frac{\left( {{Y\left( \overset{->}{r} \right)} - {Y\left( {\overset{->}{r}}^{\prime} \right)}} \right)^{2}}{\sigma_{ph}^{2}}} \right)}} & \left( {{Equation}\mspace{14mu} 4} \right) \end{matrix}$

while σ_(s) and σ_(ph) are constants.

Convolution with spatial component can be calculated efficiently by way of Fast Fourier Transform (FFT). However, calculations of Equation 1 with a photometric component w_(ph)(Y({right arrow over (r)}),Y({right arrow over (r)}′)) may not be preformed by FFT and may involve a large computational cost. The computational cost of the above described bilateral filter may be estimated to be O(N)operations per pixel where N is the number of pixels in support. One method to decrease the computational cost is by approximate filter calculation. Alternatively, bilateral filtering may be calculated by an iterative method.

SUMMARY OF THE INVENTION

The present invention proposes a system, device and method for performing bilateral filtering using convolution by way of FFT or a recursive sequence method. According to some embodiments of the invention, a bilateral filtering system may comprise an imaging device to take at least one input image, said input image is in the form of digital data indexed to represent the intensity Y({right arrow over (r)}) at a particular position {right arrow over (r)}=(x₁, . . . ,x_(m)) (m≧1) in said image, a processor to calculate a corresponding second image X({right arrow over (r)}) using a bilateral filter of the form:

$\begin{matrix} {{{X\left( \overset{->}{r} \right)} = {\frac{1}{v\left( \overset{->}{r} \right)}{\sum\limits_{{\overset{->}{r}}^{\prime}}^{\;}{{w\left( {\overset{->}{r},{\overset{->}{r}}^{\prime}} \right)} \cdot {Y\left( {\overset{->}{r}}^{\prime} \right)}}}}}{{v\left( \overset{->}{r} \right)} = {\sum\limits_{{\overset{->}{r}}^{\prime}}^{\;}{w\left( {\overset{->}{r},{\overset{->}{r}}^{\prime}} \right)}}}} & \left( {{Equation}\mspace{14mu} 1} \right) \end{matrix}$

where w({right arrow over (r)},{right arrow over (r)}′)=w _(s)({right arrow over (r)}−{right arrow over (r)}′)·w _(ph)(Y({right arrow over (r)})−Y({right arrow over (r)}′))   (Equation 2)

w_(s) is a spatial component, w_(ph) is a photometric component, and at least one of said components is in the form:

$\begin{matrix} {{w(t)} = {w_{0} + {\sum\limits_{k = 1}^{n}{s_{k} \cdot {w_{k}(t)}}}}} & \left( {{Equation}\mspace{14mu} 5} \right) \\ {{w_{k}(t)} = a_{k}^{t}} & \left( {{Equation}\mspace{14mu} 6} \right) \end{matrix}$

where a_(k) (k=1 . . . n), w₀ and s_(k) (k=1 . . . n) are constants and t belongs to a window interval I=[−N₁,N₂], and a display unit to present said second image X({right arrow over (r)}).

According to some embodiments of the invention, a method for bilateral filtering may comprise taking at least one input image, said input image is in the form of digital data indexed to represent the intensity Y({right arrow over (r)}) at a particular position {right arrow over (r)}=(x₁, . . . ,x_(m)) (m≧1) in said image, calculating a corresponding second image X({right arrow over (r)}) using a bilateral filter of the form:

$\begin{matrix} {{{X\left( \overset{->}{r} \right)} = {\frac{1}{v\left( \overset{->}{r} \right)}{\sum\limits_{{\overset{->}{r}}^{\prime}}^{\;}{{w\left( {\overset{->}{r},{\overset{->}{r}}^{\prime}} \right)} \cdot {Y\left( {\overset{->}{r}}^{\prime} \right)}}}}}{{v\left( \overset{->}{r} \right)} = {\sum\limits_{{\overset{->}{r}}^{\prime}}^{\;}{w\left( {\overset{->}{r},{\overset{->}{r}}^{\prime}} \right)}}}} & \left( {{Equation}\mspace{14mu} 1} \right) \\ {{where},{{w\left( {\overset{->}{r},{\overset{->}{r}}^{\prime}} \right)} = {{w_{s}\left( {\overset{->}{r} - {\overset{->}{r}}^{\prime}} \right)} \cdot {w_{ph}\left( {{Y\left( \overset{->}{r} \right)} - {Y\left( {\overset{->}{r}}^{\prime} \right)}} \right)}}}} & \left( {{Equation}\mspace{14mu} 2} \right) \end{matrix}$

w_(s) is a spatial component, w_(ph) is a photometric component, and at least one of said components is in the form:

$\begin{matrix} {{w(t)} = {w_{0} + {\sum\limits_{k = 1}^{n}{s_{k} \cdot {w_{k}(t)}}}}} & \left( {{Equation}\mspace{14mu} 5} \right) \end{matrix}$

w _(k)(t)=a _(k) ^(t)   (Equation 6)

where a_(k) (k=1 . . . n), w₀ and s_(k) (k=1 . . . n) are constants and t belongs to a window interval I=[−N₁,N₂] and displaying said second image X({right arrow over (r)}).

According to some embodiments of the invention, at least one of said components take the form:

w(t)=f _(n)(t)=(1+cos σt)^(n)   (Equation 8)

Or the form

w(t)=w ₀−cos h(t/σ)   (Equation 11)

where n is a natural number and σ may be a real number.

According to some embodiments of the invention, said corresponding second image X({right arrow over (r)}) is calculated according to

$\begin{matrix} {{X\left( \overset{->}{r} \right)} = {\frac{1}{v\left( \overset{->}{r} \right)}{^{{- \sigma} \cdot {Y(\overset{->}{r})}} \cdot {\sum\limits_{{\overset{->}{r}}^{\prime}}^{\;}{^{\sigma \cdot {Y({\overset{->}{r}}^{\prime})}} \cdot {Y\left( {\overset{->}{r}}^{\prime} \right)} \cdot {w_{s}\left( {\overset{->}{r} - {\overset{->}{r}}^{\prime}} \right)}}}}}} & \left( {{Equation}\mspace{14mu} 16} \right) \end{matrix}$

where w_(s) is a kernel of a spatial filter, σ is a real constant and

$\begin{matrix} {{v\left( \overset{->}{r} \right)} = {\sum\limits_{{\overset{->}{r}}^{\prime}}^{\;}{^{\sigma \cdot {({{Y(\overset{->}{r})} - {Y({\overset{->}{r}}^{\prime})}})}} \cdot {w_{s}\left( {\overset{->}{r} - {\overset{->}{r}}^{\prime}} \right)}}}} & \left( {{Equation}\mspace{14mu} 15} \right) \end{matrix}$

According to some embodiments of the invention, at least one of said photometric and spatial components is in the form:

w(t ₁ ,t ₂ , . . . ,t _(k))=w ₁(t ₁)·w ₂(t ₂)· . . . ·w _(k)(t _(k))   (Equation 5)

where each sub-component w₁(t₁),w₂(t₂) . . . w_(k)(t_(k)) conforms to said Equations 5 and 6.

BRIEF DESCRIPTION OF THE DRAWINGS

The subject matter regarded as the invention is particularly pointed out and distinctly claimed in the concluding portion of the specification. The invention, however, both as to organization and method of operation, together with objects, features, and advantages thereof, may best be understood by reference to the following detailed description when read with the accompanying drawings in which:

FIG. 1 is a block diagram of an exemplary bilateral filtering system according to some embodiments of the invention;

FIG. 2 is an exemplary flowchart of a method of improving an image according to some embodiments of the invention; and

FIGS. 3A and 3B are a “before and after” example pictures demonstrating the changes in an outcome pictures of a bilateral filter versus an input picture according to embodiments of the current invention.

It will be appreciated that for simplicity and clarity of illustration, elements shown in the figures have not necessarily been drawn to scale. For example, the dimensions of some of the elements may be exaggerated relative to other elements for clarity. Further, where considered appropriate, reference numerals may be repeated among the figures to indicate corresponding or analogous elements.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the invention. However, it will be understood by those skilled in the art that the present invention may be practiced without these specific details. In other instances, well-known methods, procedures, and components have not been described in detail so as not to obscure the present invention.

According to some embodiments of the present invention proper selection of functions for the photometric and spatial components of a bilateral filter may reduce the computational cost of the bilateral filter while preserving the bilateral filter de-noising and edge detection capabilities. Such functions may reduce the computational cost of a bilateral filter to substantially O(1). For clarity proposes, embodiments of the invention will mostly be described as it relates to a gray level two-dimensional digital images. However, as it will be explained further in this document, the present method can be extended to color images and images of higher dimensions.

Reference is now made to FIG. 1 which is a block diagram of an exemplary bilateral filtering system 100 according to some embodiments of the invention. System 100 may comprise a digital imaging device 10, a display device 16, a processor 12 and a filter 14. Digital imaging device 16 may be a digital camera, capable of outputting image data in the form of digital data indexed to represent the intensity Y at a particular position in the image to be displayed on display device 16. Display device 16 may be a generic screen-type display device, a printing device, a projector etc. The position of a pixel can also be represented by a vector {right arrow over (r)} while {right arrow over (r)}=(x₁, . . . ,x_(m)) (m≧1). In a planar two dimensional image each position {right arrow over (r)}=(x,y) may refer, in a planar two dimensional array, to a single row/column pixel position of display device 16. The display area of display device 16 may be an M-row by N-column array. The intensity of each pixel in an input image receivable from imaging device 10 may be processed, adjusted and filtered in accordance with the present method by processor 14 accommodating filter 12.

Reference is now made to FIG. 2 which is a schematic flowchart illustration of a method which may be performed by a system performing a bilateral filter according to some demonstrative embodiments of the invention. Although embodiments of the invention are not limited in this respect, the method may be performed by embodiments of the invention, for example, an embodiment as shown in FIG. 1.

According to some embodiments of the invention a bilateral filter may be performed with a photometric component, a spatial component or both of the general form:

$\begin{matrix} {{{w(t)} = {w_{0} + {\sum\limits_{k = 1}^{n}{s_{k} \cdot {w_{k}(t)}}}}}{where}} & \left( {{Equation}\mspace{14mu} 6} \right) \\ {{w_{k}(t)} = a_{k}^{t}} & \left( {{Equation}\mspace{14mu} 7} \right) \end{matrix}$

a_(k) (k=1 . . . n), w₀ and s_(k) (k=1 . . . n) are constants, t belongs to an interval I=[T₁,T₂].

It can be mathematically proved that each of w_(k) has a property:

w _(k)(t ₁ +t ₂)=w _(k)(t ₁)·w _(k)(t ₂)   (Equation 8)

Using mathematical expressions that conform to Equations 5 and 6 as the photometric component, spatial component or both, of a bilateral filter may simplify the convolution defined in Equation 1, as will be demonstrated in the following examples.

For example, the photometric component may take the form:

w(t)=f _(n)(t)=(1+cos σt)^(n)   (Equation 9)

where n is a natural number and σ may be a real number. f_(n)(t) may be expanded into Fourier polynomial:

$\begin{matrix} {{f_{n}(t)} = {\frac{a_{0}}{2} + {\sum\limits_{k = 1}^{n}{a_{k}\cos \; {k \cdot \sigma \cdot t}}}}} & \left( {{Equation}\mspace{14mu} 10} \right) \end{matrix}$

where each of components cos kσt may be written as

$\begin{matrix} {{g_{k}(t)} = {{\cos \; {k \cdot \sigma \cdot t}} = {\frac{1}{2}\left( {^{\; k\; \sigma \; t} + ^{{- }\; k\; \sigma \; t}} \right)}}} & \left( {{Equation}\mspace{14mu} 11} \right) \end{matrix}$

thus, Equation 8 is in the form of Equations 5 and 6. Another example for a function of Equations 5 and 6 may be the hyperbolic cosine:

$\begin{matrix} {{w(t)} = {{w_{0} - {\cosh \left( {t/\sigma} \right)}} = {w_{0} - \frac{^{t/\sigma} + ^{{- t}/\sigma}}{2}}}} & \left( {{Equation}\mspace{14mu} 12} \right) \end{matrix}$

According to some embodiments of the invention, when filters of the forms presented in Equations 8 and 11 are used for photometric filtering the argument of the filter function may be the intensity value in a pixel, such that:

w _(ph)({right arrow over (r)},{right arrow over (r)}′)=ŵ(Y({right arrow over (r)}),Y({right arrow over (r)}′))   (Equation 13)

where Y({right arrow over (r)}) are the intensity values of the image in a point {right arrow over (r)}=(x,y) and Y({right arrow over (r)}′) is intensity values of the image in surrounding pixels {right arrow over (r)}′ pertaining to a window around {right arrow over (r)}. Moreover, according to some embodiments of the invention, an unbiased photometric filter may be used, i.e. a filter which depends only on the difference Y({right arrow over (r)})−Y({right arrow over (r)}′):

w _(ph)({right arrow over (r)},{right arrow over (r)}′)=w(Y({right arrow over (r)}′)−Y({right arrow over (r)}))   (Equation 14)

Filtering with the function of the forms presented in Equation 8 and Equation 11 when the argument is the difference Y({right arrow over (r)})−Y({right arrow over (r)}′) and when σ may be a real or imaginary number may be a linear combination of expressions of the type:

$\begin{matrix} {{{X\left( \overset{\rightarrow}{r} \right)} = {\frac{1}{v\left( \overset{\rightarrow}{r} \right)}{\sum\limits_{\;^{{\overset{\rightarrow}{r}}^{\prime}}}\; {^{\sigma \cdot {({{Y{(\overset{\rightarrow}{r})}} - {Y{({\overset{\rightarrow}{r}}^{\prime})}}})}} \cdot {Y\left( {\overset{\rightarrow}{r}}^{\prime} \right)} \cdot {w_{s}\left( {\overset{\rightarrow}{r} - {\overset{\rightarrow}{r}}^{\prime}} \right)}}}}}{where}} & \left( {{Equation}\mspace{14mu} 15} \right) \\ {{v\left( \overset{\rightarrow}{r} \right)} = {\sum\limits_{\;^{{\overset{\rightarrow}{r}}^{\prime}}}\; {^{\sigma \cdot {({{Y{(\overset{\rightarrow}{r})}} - {Y{({\overset{\rightarrow}{r}}^{\prime})}}})}} \cdot {w_{s}\left( {\overset{\rightarrow}{r} - {\overset{\rightarrow}{r}}^{\prime}} \right)}}}} & {\left( {{Equation}\mspace{11mu} 16} \right)\;} \end{matrix}$

Equation 14 may be modified to the expression:

$\begin{matrix} {{X\left( \overset{\rightarrow}{r} \right)} = {\frac{1}{v\left( \overset{\rightarrow}{r} \right)}{^{{- \sigma} \cdot {Y{(\overset{\rightarrow}{r})}}} \cdot {\sum\limits_{\;^{{\overset{\rightarrow}{r}}^{\prime}}}\; {^{\sigma \cdot {Y{({\overset{\rightarrow}{r}}^{\prime})}}} \cdot {Y\left( {\overset{\rightarrow}{r}}^{\prime} \right)} \cdot {{w_{s}\left( {\overset{\rightarrow}{r} - {\overset{\rightarrow}{r}}^{\prime}} \right)}.}}}}}} & \left( {{Equation}\mspace{14mu} 17} \right) \end{matrix}$

where w_(s) is the kernel of a spatial filter. The sum in Equation 16 is a convolution which can be efficiently calculated using FFT. Moreover if the spatial filter w_(s) is a separable filter, i.e. w_(s)(x,y)=w_(x)(x)·w_(y)(y) defined in the interval I=[X₁,X₂]×[Y₁,Y₂] then Equation 16 can be performed as two consequent one dimensional integrations. In this case the computational cost is O(L_(x)+L_(y)) where L_(x) is the number of pixels in the support of w_(x)(x) and L_(y) is the number of pixels in the support of w_(y)(y). Moreover, if w_(x)(x) and w_(y)(y) are constant at each point of the corresponding support then the convolution in Equation 16 may be calculated using the result at the previous pixel, thus reducing the computational cost of the filtering. The computational cost of a bilateral filter in the form of Equation 16 in this case may be substantially O(1).

According to some embodiments of the invention, a two dimensional spatial factor of the filter function w({right arrow over (r)}) may be separable, i.e.:

w _(s)({right arrow over (r)})=w _(x)(x)·w _(y)(y)   (Equation 18)

where w_(x)(x) and w_(y)(y) have the form presented in Equations 5 and 6.

An example for a filter that conforms to Equation 17 may be w({right arrow over (r)},{right arrow over (r)}′)=w_(s)({right arrow over (r)},{right arrow over (r)}′), where w_(s) is a separable filter in the form:

$\begin{matrix} {{w_{s}\left( {x,y} \right)} = \left\{ \begin{matrix} {\left( {w_{s\; 0} - {{2 \cdot \cos}\; {h\left( \frac{x}{\sigma_{s}} \right)}}} \right) \cdot} & \left( {w_{s\; 0} - {{2 \cdot \cos}\; {h\left( \frac{y}{\sigma_{s}} \right)}}} \right) \\ {{x \in \left\lbrack {{- N_{F}},N_{F}} \right\rbrack},} & {y \in \left\lbrack {{- M_{F}},M_{F}} \right\rbrack} \\ {0,} & {otherwise} \end{matrix} \right.} & {\left( {{Equation}\mspace{11mu} 19} \right)\;} \end{matrix}$

where 2·M_(F) and 2·N_(F) are window support sizes.

According to some embodiments of the invention a bilateral filter in the general form presented in Equations 5 and 6 may be extended to two or more dimensions to form a multi-sub-component surrounding function. Multi-sub-component surrounding functions may be used for both spatial and photometric filtering.

According to some embodiments of the invention, a bilateral filter may be extended to color images and images of higher dimensions. The photometric component of a multi-sub-components filter, the spatial component of a multi-sub-components filter or both, may take the form:

w(t ₁ ,t ₂ , . . . ,t _(k))=w ₁(t ₁)·w ₂(t ₂)· . . . ·w _(k)(t _(k))   (Equation 20)

where each sub-component w₁(t₁),w₂(t₂) . . . w_(k)(t_(k)) conforms to Equations 5 and 6. The same principles demonstrated in the two dimensional case may apply here.

As example for a multi-sub-component bilateral filter that conforms to Equation 5, 6 and 19 may be a bilateral filter with a photometric component or a spatial component with kernel in the form:

f(t ₁ ,t ₂ , . . . ,t _(k))=(1+cos t ₁)^(n) ¹ ·(1+cos t ₂)^(n) ² · . . . ·(1+cos t _(k))^(n) ^(k)   (Equation 21)

where n₁-n_(K) are natural numbers. The form of each sub-component of the bilateral filter of equation 20 conforms to Equations 5 and 6 as shown with reference to Equations 8, 9 and 10. This filter can be applied to images having more than a single color, such as RGB images. When used for RGB images the filter of Equation 20 may have three sub-components such that every sub-component of the filter kernel may relate to one color data of RGB image for example:

f(t _(r) ,t _(g) ,t _(b))=(1+cos t _(r))^(n) ^(r) ·(1+cos t _(g))^(n) ^(g) ·(1+cos t _(b))^(n) ^(b)   (Equation 22)

where t_(r) is the red sub-component, t_(g) is the green sub-component and t_(b) is the blue sub-component. This method may emphasize edges and smooth noisy RGB images.

According to some embodiments of the invention multi-sub-components bilateral filter conforming to Equation 20 may also take into account local gradients. For example, multi-sub-components bilateral filter conforming to Equation 20 may be used for gray-level digital images, where the first sub-component in the kernel of the filter depends on the image intensity values Y({right arrow over (r)}) and the second and the third sub-components depend on image partial derivatives over x-coordinate and y-coordinate, respectively. According to some embodiments of the invention, the local gradient w_(g)(∇Y({right arrow over (r)}),∇Y({right arrow over (r)}′)) may be represented as a product of two sub-components such that each of them relates to a partial derivative at one direction, for example:

w _(g)(∇Y({right arrow over (r)}),∇Y({right arrow over (r)}′))=w _(gx)(Y′ _(x)({right arrow over (r)})−Y′ _(x)({right arrow over (r)}′))·w _(gy)(Y′ _(y)({right arrow over (r)})−Y′ _(y)({right arrow over (r)}′))   (Equation 23)

Where w_(gx) and w_(gy) have the form presented in Equations 5 and 6. When applied on noisy gray image, this filter may yield a de-noised smooth image with preserved clear edges.

While embodiments of the present invention were described with relation to 2D images, it may be clear to those skilled in the art that the present invention can be extended easily to the higher dimensional images, for example 3D images, using the same principles described here above.

FIGS. 3A and 3B are “before and after” example pictures demonstrating the changes in an outcome pictures of a bilateral filter versus an input picture according to embodiments of the current invention. FIG. 3A is the picture before filtering and FIG. 3B is the picture after filtering. It can be seen that too fine details (for the purpose of the image processing of the present invention), which may represent the effect of noise in a picture, disappeared from the filtered image while sharp edges were preserved. For example while many details 310 on the skin of the clown disappeared in the filtered image 330, the edges of the black mark 320 on the skin are clearly seen on the filtered image 340. While other, known in the art, filters may achieve substantially similar outcomes, filtering according to embodiments of the invention requires significantly less computational power.

While certain features of the invention have been illustrated and described herein, many modifications, substitutions, changes, and equivalents will now occur to those of ordinary skill in the art. It is, therefore, to be understood that the appended claims are intended to cover all such modifications and changes as fall within the true spirit of the invention. 

1. A bilateral filtering system, the system comprising: an imaging device to take at least one input image, said input image is in the form of digital data indexed to represent the intensity Y({right arrow over (r)}) at a particular position {right arrow over (r)}=(x₁, . . . ,x_(m)) (m≧1) in said image; a processor to calculate a corresponding second image X({right arrow over (r)}) using a bilateral filter of the form: $\begin{matrix} {{{X\left( \overset{\rightarrow}{r} \right)} = {\frac{1}{v\left( \overset{\rightarrow}{r} \right)}{\sum\limits_{\;^{{\overset{\rightarrow}{r}}^{\prime}}}{{w\left( {\overset{\rightarrow}{r},{\overset{\rightarrow}{r}}^{\prime}} \right)} \cdot {Y\left( {\overset{\rightarrow}{r}}^{\prime} \right)}}}}}{{v\left( \overset{\rightarrow}{r} \right)} = {\sum\limits_{\;^{{\overset{\rightarrow}{r}}^{\prime}}}{w\left( {\overset{\rightarrow}{r},{\overset{\rightarrow}{r}}^{\prime}} \right)}}}{where}} & \left( {{Equation}\mspace{14mu} 1} \right) \\ {{w\left( {\overset{\rightarrow}{r},{\overset{\rightarrow}{r}}^{\prime}} \right)} = {{w_{s}\left( {\overset{\rightarrow}{r} - {\overset{\rightarrow}{r}}^{\prime}} \right)} \cdot {w_{ph}\left( {{Y\left( \overset{\rightarrow}{r} \right)} - {Y\left( {\overset{\rightarrow}{r}}^{\prime} \right)}} \right)}}} & \left( {{Equation}\mspace{14mu} 2} \right) \end{matrix}$ w_(s) is a spatial component, w_(ph) is a photometric component, and at least one of said components is in the form: $\begin{matrix} {{w(t)} = {w_{0} + {\sum\limits_{k = 1}^{n}\; {s_{k} \cdot {w_{k}(t)}}}}} & \left( {{Equation}\mspace{14mu} 5} \right) \\ {{w_{k}(t)} = a_{k}^{t}} & \left( {{Equation}\mspace{14mu} 6} \right) \end{matrix}$ where a_(k) (k=1 . . . n), w₀ and s_(k) (k=1 . . . n) are constants and t belongs to a window interval I=[−N₁,N₂], and to transmit said second image to a display; and a display unit to present said second image X({right arrow over (r)}).
 2. The system of claim 1, wherein at least one of said components take one form selectable from a list comprising: w(t)=f _(n)(t)=(1+cos σt)^(n)   (Equation 8) and w(t)=w ₀−cos h(t/σ)   (Equation 11) where n is a natural number and σ may be a real number.
 3. The device of claim 1, wherein said processor to calculate said corresponding second image X({right arrow over (r)}) according to $\begin{matrix} {{X\left( \overset{\rightarrow}{r} \right)} = {\frac{1}{v\left( \overset{\rightarrow}{r} \right)}{^{{- \sigma} \cdot {Y{(\overset{\rightarrow}{r})}}} \cdot {\sum\limits_{\;^{{\overset{\rightarrow}{r}}^{\prime}}}\; {^{\sigma \cdot {Y{({\overset{\rightarrow}{r}}^{\prime})}}} \cdot {Y\left( {\overset{\rightarrow}{r}}^{\prime} \right)} \cdot {{w_{s}\left( {\overset{\rightarrow}{r} - {\overset{\rightarrow}{r}}^{\prime}} \right)}.}}}}}} & \left( {{Equation}\mspace{14mu} 16} \right) \end{matrix}$ where w_(s) is a kernel of a spatial filter, σ is a real constant and $\begin{matrix} {{v\left( \overset{\rightarrow}{r} \right)} = {\sum\limits_{\;^{{\overset{\rightarrow}{r}}^{\prime}}}\; {^{\sigma \cdot {({{Y{(\overset{\rightarrow}{r})}} - {Y{({\overset{\rightarrow}{r}}^{\prime})}}})}} \cdot {w_{s}\left( {\overset{\rightarrow}{r} - {\overset{\rightarrow}{r}}^{\prime}} \right)}}}} & \left( {{Equation}\mspace{14mu} 15} \right) \end{matrix}$
 4. The system of claim 1, wherein said special component of said filter function w({right arrow over (r)}) is separable such that w({right arrow over (r)})=w _(x)(x)·w _(y)(y)   (Equation 17)
 5. The system of claim 4, wherein said filter function w({right arrow over (r)}) is in the form: $\begin{matrix} {{w_{s}\left( {x,y} \right)} = \left\{ \begin{matrix} {\left( {w_{s\; 0} - {{2 \cdot \cos}\; {h\left( \frac{x}{\sigma_{s}} \right)}}} \right) \cdot} & \left( {w_{s\; 0} - {{2 \cdot \cos}\; {h\left( \frac{y}{\sigma_{s}} \right)}}} \right) \\ {{x \in \left\lbrack {{- N_{F}},N_{F}} \right\rbrack},} & {y \in \left\lbrack {{- M_{F}},M_{F}} \right\rbrack} \\ {0,} & {otherwise} \end{matrix} \right.} & \left( {{Equation}\mspace{14mu} 18} \right) \end{matrix}$ where 2·M_(F) and 2·N_(F) are window support sizes.
 6. The system of claim 1, wherein at least one of said photometric and spatial components is in the form: w(t ₁ ,t ₂ , . . . ,t _(k))=w ₁(t ₁)·w ₂(t ₂)· . . . ·w _(k)(t _(k))   (Equation 24) where each sub-component w₁(t₁),w₂(t₂) . . . w_(k)(t_(k)) conforms to said Equations 5 and
 6. 7. The system of claim 6, wherein at least one of said photometric and spatial components is in the form: f(t ₁ ,t ₂ , . . . ,t _(k))=(1+cos t ₁)^(n) ¹ ·(1+cos t ₂)^(n) ¹ · . . . ·(1+cos t _(k))^(n) ^(k)   (Equation 20) where n₁-n_(K) are natural numbers.
 8. The system of claim 6, wherein three of said sub-components relate, each to one color data of a RGB image.
 9. The system of claim 8, wherein at least one of said photometric and spatial components is in the form: f(t _(r) ,t _(g) ,t _(b))=(1+cos t _(r))^(n) ^(r) ·(1+cos t _(g))^(n) ^(g) ·(1+cos t _(b))^(n) ^(b)   (Equation 21) where t_(r) is the red component, t_(g) is the green component and t_(b) is the blue component.
 10. The system of claim 6, wherein at least one of said sub-components depends on local gradients.
 11. The system of claim 10, wherein at least one of said sub-components depends on a partial derivative at one direction.
 12. The system of claim 11, wherein said photometric component is in the form: w _(g)(∇Y({right arrow over (r)}),∇Y({right arrow over (r)}′))=w _(gx)(Y′ _(x)({right arrow over (r)})−Y′ _(x)({right arrow over (r)}′))·w _(gy)(Y′ _(y)({right arrow over (r)})−Y′ _(y)({right arrow over (r)}′))   (Equation 22)
 13. A method for image processing, the method comprising: taking at least one input image, said input image is in the form of digital data indexed to represent the intensity Y({right arrow over (r)}) at a particular position {right arrow over (r)}=(x₁, . . . ,x_(m)) (m≧1) in said image; calculating a corresponding second image X({right arrow over (r)}) using a bilateral filter of the form: $\begin{matrix} {{{X\left( \overset{\rightarrow}{r} \right)} = {\frac{1}{v\left( \overset{\rightarrow}{r} \right)}{\sum\limits_{\;^{{\overset{\rightarrow}{r}}^{\prime}}}{{w\left( {\overset{\rightarrow}{r},{\overset{\rightarrow}{r}}^{\prime}} \right)} \cdot {Y\left( {\overset{\rightarrow}{r}}^{\prime} \right)}}}}}{{v\left( \overset{\rightarrow}{r} \right)} = {\sum\limits_{\;^{{\overset{\rightarrow}{r}}^{\prime}}}{w\left( {\overset{\rightarrow}{r},{\overset{\rightarrow}{r}}^{\prime}} \right)}}}{{where},}} & \left( {{Equation}\mspace{14mu} 1} \right) \\ {{w\left( {\overset{\rightarrow}{r},{\overset{\rightarrow}{r}}^{\prime}} \right)} = {{w_{s}\left( {\overset{\rightarrow}{r} - {\overset{\rightarrow}{r}}^{\prime}} \right)} \cdot {w_{ph}\left( {{Y\left( \overset{\rightarrow}{r} \right)} - {Y\left( {\overset{\rightarrow}{r}}^{\prime} \right)}} \right)}}} & \left( {{Equation}\mspace{14mu} 2} \right) \end{matrix}$ w_(s) is a spatial component, w_(ph) is a photometric component, and at least one of said components is in the form: $\begin{matrix} {{w(t)} = {w_{0} + {\sum\limits_{k = 1}^{n}\; {s_{k} \cdot {w_{k}(t)}}}}} & \left( {{Equation}\mspace{14mu} 5} \right) \\ {{w_{k}(t)} = a_{k}^{t}} & \left( {{Equation}\mspace{14mu} 6} \right) \end{matrix}$ where a_(k) (k=1 . . . n), w₀ and s_(k) (k=1 . . . n) are constants and t belongs to a window interval I=[−N₁,N₂]; and displaying said second image X({right arrow over (r)}).
 14. The method of claim 13, wherein at least one of said components takes one form selectable from a list comprising: w(t)=f _(n)(t)=(1+cos σt)^(n)   (Equation 8) and w(t)=w ₀−cos h(t/σ)   (Equation 11) where n is a natural number and σ may be a real number.
 15. The method of claim 13, wherein said calculation of said corresponding second image X({right arrow over (r)}) is performed according to $\begin{matrix} {{X\left( \overset{\rightarrow}{r} \right)} = {\frac{1}{v\left( \overset{\rightarrow}{r} \right)}{^{{- \sigma} \cdot {Y{(\overset{\rightarrow}{r})}}} \cdot {\sum\limits_{\;^{{\overset{\rightarrow}{r}}^{\prime}}}\; {^{\sigma \cdot {Y{({\overset{\rightarrow}{r}}^{\prime})}}} \cdot {Y\left( {\overset{\rightarrow}{r}}^{\prime} \right)} \cdot {w_{s}\left( {\overset{\rightarrow}{r} - {\overset{\rightarrow}{r}}^{\prime}} \right)}}}}}} & \left( {{Equation}\mspace{14mu} 16} \right) \end{matrix}$ where w_(s) is a kernel of a spatial filter, σ is a real constant and $\begin{matrix} {{v\left( \overset{\rightarrow}{r} \right)} = {\sum\limits_{\;^{{\overset{\rightarrow}{r}}^{\prime}}}\; {^{\sigma \cdot {({{Y{(\overset{\rightarrow}{r})}} - {Y{({\overset{\rightarrow}{r}}^{\prime})}}})}} \cdot {w_{s}\left( {\overset{\rightarrow}{r} - {\overset{\rightarrow}{r}}^{\prime}} \right)}}}} & \left( {{Equation}\mspace{14mu} 15} \right) \end{matrix}$
 16. The method of claim 13, wherein said special component of said filter function w({right arrow over (r)}) is separable such that w({right arrow over (r)})=w _(x)(x)·w _(y)(y)   (Equation 17)
 17. The method of claim 16, wherein filter function w({right arrow over (r)}) is in the form: $\begin{matrix} {{w_{s}\left( {x,y} \right)} = \left\{ \begin{matrix} {\left( {w_{s\; 0} - {{2 \cdot \cos}\; {h\left( \frac{x}{\sigma_{s}} \right)}}} \right) \cdot} & \left( {w_{s\; 0} - {{2 \cdot \cos}\; {h\left( \frac{y}{\sigma_{s}} \right)}}} \right) \\ {{x \in \left\lbrack {{- N_{F}},N_{F}} \right\rbrack},} & {y \in \left\lbrack {{- M_{F}},M_{F}} \right\rbrack} \\ {0,} & {otherwise} \end{matrix} \right.} & \left( {{Equation}\mspace{14mu} 18} \right) \end{matrix}$ Where 2·M_(F) and 2·N_(F) are window support sizes.
 18. The method of claim 13, wherein at least one of said photometric and spatial components is in the form: w(t ₁ ,t ₂ , . . . ,t _(k))=w ₁(t ₁)·w ₂(t ₂)· . . . ·w _(k)(t _(k))   (Equation 25) where each sub-component w₁(t₁),w₂(t₂) . . . w_(k)(t_(k)) conforms to said Equations 5 and
 6. 19. The method of claim 18, wherein at least one of said photometric and spatial components is in the form: f(t ₁ ,t ₂ , . . . ,t _(k))=(1+cos t ₁)^(n) ¹ ·(1+cos t ₂)^(n) ¹ · . . . ·(1+cos t _(k))^(n) ^(k)   (Equation 20) where n₁-n_(K) are natural numbers.
 20. The method of claim 18, wherein three of said sub-components relate, each to one color data of a RGB image.
 21. The method of claim 20, wherein at least one of said photometric and spatial components is in the form: f(t _(r) ,t _(g) ,t _(b))=(1+cos t _(r))^(n) ^(r) ·(1+cos t _(g))^(n) ^(g) ·(1+cos t _(b))^(n) ^(b)   (Equation 21) where t_(r) is the red component, t_(g) is the green component and t_(b) is the blue component.
 22. The method of claim 18, wherein at least one of said sub-components depends on local gradients.
 23. The method of claim 22, wherein at least one of said sub-components depends on a partial derivative at one direction.
 24. The method of claim 23, wherein said photometric component is in the form: w _(g)(∇Y({right arrow over (r)}),∇Y({right arrow over (r)}′))=w _(gx)(Y′ _(x)({right arrow over (r)})−Y′ _(x)({right arrow over (r)}′))·w _(gy)(Y′ _(y)({right arrow over (r)})−Y′ _(y)({right arrow over (r)}′))   (Equation 22)
 25. A machine-readable medium having stored thereon instructions that, if executed by a machine, cause the machine to perform a method comprising: receiving at least one input image, said input image is in the form of digital data indexed to represent the intensity Y({right arrow over (r)}) at a particular position {right arrow over (r)}=(x₁, . . . ,x_(m)) (m≧1) in said image; calculating a corresponding second image X({right arrow over (r)}) using a bilateral filter of the form: $\begin{matrix} {{{X\left( \overset{\rightarrow}{r} \right)} = {\frac{1}{v\left( \overset{\rightarrow}{r} \right)}{\sum\limits_{\;^{{\overset{\rightarrow}{r}}^{\prime}}}{{w\left( {\overset{\rightarrow}{r},{\overset{\rightarrow}{r}}^{\prime}} \right)} \cdot {Y\left( {\overset{\rightarrow}{r}}^{\prime} \right)}}}}}{{v\left( \overset{\rightarrow}{r} \right)} = {\sum\limits_{\;^{{\overset{\rightarrow}{r}}^{\prime}}}{w\left( {\overset{\rightarrow}{r},{\overset{\rightarrow}{r}}^{\prime}} \right)}}}{{where},}} & \left( {{Equation}\mspace{14mu} 1} \right) \\ {{w\left( {\overset{\rightarrow}{r},{\overset{\rightarrow}{r}}^{\prime}} \right)} = {{w_{s}\left( {\overset{\rightarrow}{r} - {\overset{\rightarrow}{r}}^{\prime}} \right)} \cdot {w_{ph}\left( {{Y\left( \overset{\rightarrow}{r} \right)} - {Y\left( {\overset{\rightarrow}{r}}^{\prime} \right)}} \right)}}} & \left( {{Equation}\mspace{14mu} 2} \right) \end{matrix}$ w_(s) is a spatial component, w_(ph) is a photometric component, and at least one of said photometric component is in the form: $\begin{matrix} {{w(t)} = {w_{0} + {\sum\limits_{k = 1}^{n}\; {s_{k} \cdot {w_{k}(t)}}}}} & \left( {{Equation}\mspace{14mu} 5} \right) \\ {{w_{k}(t)} = a_{k}^{t}} & \left( {{Equation}\mspace{14mu} 6} \right) \end{matrix}$ where a_(k) (k=1 . . . n), w₀ and s_(k) (k=1 . . . n) are constants and t belongs to a window interval I=[−N₁,N₂]; and sending said second image X({right arrow over (r)}) to a display unit for display. 